package ar.com.angrymachine.hunter.activities;

import java.awt.Graphics;
import java.awt.Rectangle;

import ar.com.angrymachine.hunter.Activity;

public class InfoActivity extends Activity
{
    public int timeToDie;
    private String infoLabel;
    private Activity oldActivity;
    
    public InfoActivity(Activity other)
    {
        timeToDie = 1500;
        infoLabel = other.getDescription();
        oldActivity = other;
    }

    public boolean consumesTime()
    {
        return false;
    }

    
    public String getDescription()
    {
        return infoLabel;
    }
    
    public boolean isCompleted()
    {
        return timeToDie <= 0;
    }

    public String getActionText()
    {
        return oldActivity.getActionText();
    }

    public void update(int delta, boolean action, boolean timeIsRunning)
    {
        timeToDie -= delta;
    }
    
    public void paint(Graphics g, Rectangle activityArea)
    {
        oldActivity.paint(g, activityArea);
    }

    public void onFinished()
    {
        oldActivity.onFinished();
    }
}
